﻿
fs.util.pageLoadFunction.push(function () {
    fs.sys.defaultDigits = 1;
});

var readyJSON = [
{ emptyrow: true, insertcontrol: false, description: "SUSTAINABLE DEVELOPMENT", bold: true },
{ accountcode: "NF02010100", description: "Electricity", unit: "MWh", datarow: true, digits: 0, Process: [{
    Field: "CM",
    Exp: {
        mode: "search", fields: ["NF02010101", "NF02010102"], equ: "+"
    }
}]
},
{ accountcode: "NF02010101", description: "Self-made", unit: "MWh", digits: 0, datarow: true },
{ accountcode: "NF02010102", description: "Purchased", unit: "MWh", digits: 0, datarow: true },
{ accountcode: "NF02010103", description: "Ratio Elec. Self-made vs. Total Elec.", unit: "%", withYTD: true, addition: "{0}*100", digits: 0, datarow: true, Process: [{
    Field: "CM",
    Exp: {
        mode: "search", fields: ["NF02010101", "NF02010100"], equ: "/", addition: "{0}*100"
    }
}, {
    Field: "YTD",
    Exp: {
        mode: "search", fields: ["NF02010101", "NF02010100"], equ: "/", addition: "{0}*100"
    }
}, {
    Field: "YTDM_1",
    Exp: {
        mode: "search", fields: ["NF02010101", "NF02010100"], equ: "/", addition: "{0}*100"
    }
}]
},
{ accountcode: "NF02010200", description: "Steam", unit: "MWh", digits: 0, datarow: true },
{ accountcode: "NF02010300", description: "Water", unit: "m3 ", digits: 0, datarow: true },
{ accountcode: "NF02010400", description: "CO2", unit: "T", datarow: true },
{ emptyrow: true, description: "" },
{ emptyrow: true, description: "OPERATIONAL INDICATORS (Production)", bold: true },

{ accountcode: "NF02020100", description: "Starch production (corn+wheat)", unit: "KT 87%DS", datarow: true },
{ accountcode: "NF02020200", description: "Maintenance", datarow: true },
{ accountcode: "NF02020300", description: "Net Starch Cost", unit: "{0} /T Co", datarow: true, mutilFieldType: true, Process: [{
    Field: "YTD",
    Exp: {
        mode: "search", 
        fields: ["YTDM_1|NF02020300",
        "YTDM_1|NF02020100", "CM|NF02020300",
        "CM|NF02020100",
        "CM|NF02020100", "YTDM_1|NF02020100"],
        mutilFieldType: true,
        equ: "((({0})*({1}))+(({2})*({3})))/(({4})+({5}))",
        equexpression: true
    }//{ (NF02020400 YTDM-1)* (NF02020100 YTDM-1)+ (NF02020400 current month)* (NF02020100 current month)}  /  { (NF02020100 current month)+(NF02020100 YTD M-1)}
}]
},
{ accountcode: "NF02020400", description: "Energy Cost", datarow: true },
{ accountcode: "NF02020500", description: "Energy : Global cost/TDS starch", unit: "{0} /T Ds", withYTD: true, datarow: true, Process: [{
    Field: "CM",
    Exp: {
        mode: "search", fields: ["NF02020400", "NF02020100"], equ: "/"
    }
}, {
    Field: "YTD",
    Exp: {
        mode: "search", fields: ["NF02020400", "NF02020100"], equ: "/"
    }
}, {
    Field: "YTDM_1",
    Exp: {
        mode: "search", fields: ["NF02020400", "NF02020100"], equ: "/"
    }
}]
    /*,
    { accountcode: "NF02040101", description: "Productivity", unit: "", datarow: true, Process: [{
    Field: "CM",
    Exp: {//SV01010100/HR01020100 Refrence&Product Sales By RGC&CM_QTY_TOTALHeadProduct,CM_QTY_TOTALHeadProduct  RoquetteFullTimeEquivalentmon
    mode: "search", fields: ["Refrence&Product Sales By RGC&CM_QTY_SV01010100,CM_T_SV01010100", "Refrence&HR&HR01020100"], digits: 1, equ: "/"
    }
    }]
    }*/
},
{ emptyrow: true, description: "" },
{ emptyrow: true, description: "QUALITY (Local Products)", bold: true },
{ accountcode: "NF02030100", description: "Non-quality cost", datarow: true },
{ emptyrow: true, description: "" },
{ accountcode: "NF02040100", description: "PRODUCTION KPIs", unit: " ", datarow: false, bold: true, subrow: [] }
, { insertcontrol: true, description: ""}];